<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="__PUBLIC__/admin/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">

    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">


    <!--<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/plugins/webuploader/webuploader.css">-->
    <!--<link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/css/demo/webuploader-demo.css">-->
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/jquery-ui.min.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>

    <script src="__PUBLIC__/admin/js/plugins/summernote/summernote.min.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/summernote/summernote-zh-CN.js"></script>

    <script type="text/javascript">
        $(function(){
            $('#btn').click(function(){
                var id = {$id};
                $.ajax({
                    type: "post",
                    url: "/index.php/admin/index/bind",
                    data:{
                        bind_id:$("#bind_id").val(),
                        bind_name:$("#bind_name").val(),
                        bind_did:$("#bind_did").val(),
                        id:{$id}
                    },
                    dataType: "json",
                    success: function(data){
                        console.log(data);
                        if (data.status==1) {
                            $('#show').html(data.info);
                            window.location.href='/index.php/admin/index/userlist.html';
                        } else {
                            $('#show').html(data.info);
                        }  
                    } 
                });
            });
        });
    </script>
    <!--<script src="__PUBLIC__/admin/js/plugins/webuploader/webuploader.min.js"></script>-->

    <!--<script src="__PUBLIC__/admin/js/demo/webuploader-demo.js"></script>-->
    <!--&lt;!&ndash;<script src="__PUBLIC__/admin/js/demo/webuploader_file.js"></script>&ndash;&gt;-->

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>员工绑定</h5>
                </div>
                <div  class="ibox-content" style="overflow: hidden">
                    <form id="fm" class="form-horizontal" action="__APP__/admin/index/bind/id/{$id}">
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">绑定门店编号：</label>
                                <div class="col-sm-4">
                                    <input type="text" id="bind_did" name="bind_did" class="form-control" placeholder="请输入编号" value="{$res['bind_did']}" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">绑定门店名称：</label>
                                <div class="col-sm-4">
                                    <input type="text" id="bind_name" name="bind_name" class="form-control" placeholder="请输入名称" value="" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">绑定员工编号：</label>
                                <div class="col-sm-4">
                                    <input type="text" id="bind_id" name="bind_id" class="form-control" placeholder="请输入编号" value="{$res['bind_id']}" >
                                </div>
                                <div id="show" style="color:red;font-size: 16px;"></div>
                            </div>
                            <div class="col-sm-12 col-sm-offset-3">
                                <button class="btn btn-primary" type="button" id="btn">保存内容</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>



